package com.swak.devtools.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import com.swak.boot.ApplicationBooter;
import com.swak.devtools.DevtoolsModule;
import com.swak.vertx.config.RouterBean;

/**
 * 加载 Api 组件
 * 
 * @author lifeng
 * @date 2021/04/14
 */
@Configuration
@ConditionalOnClass({ DevtoolsModule.class, RouterBean.class })
@ComponentScan(basePackageClasses = { DevtoolsModule.class })
public class AutoConfigurationDevtoolsComponents implements ApplicationBooter {

	@Override
	public void onApplicationEvent(ApplicationContext context) {
		new DevtoolsApiInitialize().initializer();
	}
}